﻿using PayPalCheckoutSdk.Orders;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AppFramework.WorkOrderModels
{
    [Table("tb_CodingRule")]
    public class CodingRule:Audit
    {
        /// <summary>
        /// 目标表单
        /// </summary>
        [Display(Name = "目标表单")]
        [MaxLength(40)]
        [Column(TypeName = "nvarchar(40)")]
        public string TargetForm { get; set; }
        /// <summary>
        /// 编码名称
        /// </summary>
        [Display(Name = "编码名称")]
        [MaxLength(40)]
        [Column(TypeName = "nvarchar(40)")]
        public string CodingName { get; set; }
        /// <summary>
        /// 编号前戳
        /// </summary>
        [Display(Name = "编号前戳")]
        [MaxLength(20)]
        [Column(TypeName = "nvarchar(20)")]
        public string CodingProd { get; set; }
        /// <summary>
        /// 时间规则
        /// </summary>
        [Display(Name = "时间规则")]
        [MaxLength(50)]
        [Column(TypeName = "nvarchar(50)")]
        public string TimeRule { get; set; }
        /// <summary>
        /// 生成类型
        /// </summary>
        [Display(Name = "生成类型")]
        [MaxLength(20)]
        [Column(TypeName = "nvarchar(20)")]
        public string GenerateType { get; set; }
        /// <summary>
        /// 初始流水号
        /// </summary>
        [Display(Name = "初始流水号")]
        [Column(TypeName = "int")]
        public int InitialNumber { get; set; } = 1;
        /// <summary>
        /// 流水号长度
        /// </summary>
        [Display(Name = "流水号长度")]
        [Column(TypeName = "int")]
        public int InitialLong { get; set; }
        /// <summary>
        /// 步长
        /// </summary>
        [Display(Name = "步长")]
        [Column(TypeName = "int")]
        public int StepSize { get; set; }
        /// <summary>
        /// 编码生成规则
        /// </summary>
        [Display(Name = "编码生成规则")]
        [MaxLength(255)]
        [Column(TypeName = "nvarchar(255)")]
        public string CodingGenerateRule { get; set; }
        /// <summary>
        /// 编号预览
        /// </summary>
        [Display(Name = "编号预览")]
        [MaxLength(255)]
        [Column(TypeName = "nvarchar(255)")]
        public string CodingPreview { get; set; }
        /// <summary>
        /// 当前编号
        /// </summary>
        [Display(Name = "当前编号")]
        [MaxLength(255)]
        [Column(TypeName = "nvarchar(255)")]
        public int Current_Number { get; set; }
    }
}
